import json
from urllib import parse, request, error
from threading import Timer
import sys
from interval import setInterval
from http_get import get


def regist(url, id):
  q = {}
  q['devCode'] = id
  return get(url + 'heartBeat', q)

@setInterval(3)
def test(arg1, arg2):
  print('arg1: ', arg1)
  print('arg2: ', arg2)

if __name__ == '__main__':
  url = 'http://127.0.0.1'
  id = 123
  stop = test(url, id)
  sys.stdin.read(1)
  stop.set()
